home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / Fresco / build / Unix / config / cf / ibmLib.rules < prev    next >
Text File  |  1995-07-12  |  4KB  |  127 lines

  1. XCOMM $XConsortium: ibmLib.rules,v 1.9 93/12/24 11:28:07 rws Exp $
  2.  
  3. /*
  4.  * AIX shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES
  9. #endif
  10. #ifndef ForceNormalLib
  11. #define ForceNormalLib NO
  12. #endif
  13. #ifndef SharedDataSeparation
  14. #define SharedDataSeparation NO
  15. #endif
  16. #ifndef SharedCodeDef
  17. #define SharedCodeDef -DSHAREDCODE
  18. #endif
  19. #ifndef SharedLibraryDef
  20. #define SharedLibraryDef -DAIXSHLIB
  21. #endif
  22. #ifndef ShLibIncludeFile
  23. #define ShLibIncludeFile <ibmLib.tmpl>
  24. #endif
  25. #ifndef PositionIndependentCFlags
  26. #define PositionIndependentCFlags -bM\:SRE
  27. #endif
  28. #ifndef ExtraLoadFlags
  29. #define ExtraLoadFlags -bnodelcsect
  30. #endif
  31. #if ThreadedX
  32. #define BaseShLibReqs -lc_r -lm
  33. #else
  34. #define BaseShLibReqs -lc -lm
  35. #endif
  36.  
  37. /*
  38.  * SharedLibReferences - variables for shared libraries
  39.  */
  40. #ifndef SharedLibReferences
  41. #define SharedLibReferences(varname,libname,libsource,revname,rev)    @@\
  42. Concat3(DEP,varname,LIB) = /**/                        @@\
  43. Concat(varname,LIB) = _Use(Concat(-l,libname),Concat(libsource/lib,libname.a)) @@\
  44. LintLibReferences(varname,libname,libsource)
  45. #endif
  46.  
  47. /*
  48.  * SharedDSLibReferences - variables for shared libraries
  49.  */
  50. #ifndef SharedDSLibReferences
  51. #define SharedDSLibReferences(varname,libname,libsource,revname,rev)    @@\
  52. SharedLibReferences(varname,libname,libsource,revname,rev)
  53. #endif
  54.  
  55. /*
  56.  * InstallSharedLibrary - generate rules to install the shared library.
  57.  */
  58. #ifndef InstallSharedLibrary
  59. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  60. InstallLibrary(libname,dest)
  61. #endif /* InstallSharedLibrary */
  62.  
  63. /*
  64.  * InstallSharedLibraryData - generate rules to install the shared library data
  65.  */
  66. #ifndef InstallSharedLibraryData
  67. #define    InstallSharedLibraryData(libname,rev,dest)
  68. #endif /* InstallSharedLibraryData */
  69.  
  70. /*
  71.  * SharedCplusplusLibraryTarget - generate rules to create a shared C++
  72.  * library; use $(CXXLINK) instead of $(LD) in case the library needs
  73.  * global constructors to be called.
  74.  *
  75.  * Not tested yet; send any bug fixes to fresco@x.org.
  76.  */
  77. #ifndef SharedCplusplusLibraryTarget
  78. #define SharedCplusplusLibraryTarget(libname,rev,solist,down,up,need_libs) @@\
  79. AllTarget(Concat(lib,libname.a))                    @@\
  80.                                     @@\
  81. Concat(lib,libname.a):  solist $(UNSHAREDOBJS)                @@\
  82.     $(RM) $@~ shr.o                            @@\
  83.     $(AR) $@~ solist                        @@\
  84.     dump -g $@~ | sed -n -e 's/^[     ]*[0-9][0-9]*[     ]*\([^     .][^     ]*\)$$/\1/p' > $@.syms    @@\
  85.     $(CXXLINK) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms need_libs BaseShLibReqs -L$(USRLIBDIR) @@\
  86.     $(RM) $@~                            @@\
  87.     $(AR) $@~ shr.o $(UNSHAREDOBJS)                    @@\
  88.     $(RM) $@.syms $@ shr.o                        @@\
  89.     $(MV) $@~ $@                            @@\
  90.                                     @@\
  91. clean::                                    @@\
  92.     $(RM) Concat(lib,libname.a)
  93.  
  94. #endif /* SharedCplusplusLibraryTarget */
  95.  
  96. /*
  97.  * NormalSharedLibraryTarget - generate rules to create a shared library;
  98.  * build it into a different name so that the we do not hose people by having
  99.  * the library gone for long periods.
  100.  */
  101. #ifndef SharedLibraryTarget
  102. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  103. AllTarget(Concat(lib,libname.a))                    @@\
  104.                                     @@\
  105. Concat(lib,libname.a):  solist $(UNSHAREDOBJS)                @@\
  106.     $(RM) $@~ shr.o                            @@\
  107.     (cd down; $(AR) up/$@~ solist)                    @@\
  108.     dump -g $@~ | sed -n -e 's/^[     ]*[0-9][0-9]*[     ]*\([^     .][^     ]*\)$$/\1/p' > $@.syms    @@\
  109.     $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms $(REQUIREDLIBS) BaseShLibReqs -L$(USRLIBDIR)    @@\
  110.     $(RM) $@~                            @@\
  111.     $(AR) $@~ shr.o $(UNSHAREDOBJS)                    @@\
  112.     $(RM) $@.syms $@ shr.o                        @@\
  113.     $(MV) $@~ $@                            @@\
  114.     LinkBuildLibrary($@)                        @@\
  115.                                     @@\
  116. clean::                                    @@\
  117.     $(RM) Concat(lib,libname.a)
  118.  
  119. #endif /* SharedLibraryTarget */
  120.  
  121. /*
  122.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  123.  */
  124. #ifndef SharedLibraryDataTarget
  125. #define SharedLibraryDataTarget(libname,rev,salist)
  126. #endif /* SharedLibraryTarget */
  127.